package opensocial4gwt;

public final class Address extends BaseJsObject {
	public static enum Field {
		TYPE, UNSTRUCTURED_ADDRESS, PO_BOX, STREET_ADDRESS, EXTENDED_ADDRESS, REGION, LOCALITY, POSTAL_CODE, COUNTRY, LATITUDE, LONGITUDE;

		public native String value() /*-{
			return $wnd.opensocial.Address.Field[this.@opensocial4gwt.Address.Field::name()()];
		}-*/;
	}

	protected Address() {
	}

	public String getType() {
		return getFieldString(Field.TYPE.value());
	}

	public String getUnstructuredAddress() {
		return getFieldString(Field.UNSTRUCTURED_ADDRESS.value());
	}

	public String getPOBox() {
		return getFieldString(Field.PO_BOX.value());
	}
	
	public String getStreetAddress() {
		return getFieldString(Field.STREET_ADDRESS.value());
	}
	
	public String getExtendedAddress() {
		return getFieldString(Field.EXTENDED_ADDRESS.value());
	}
	
	public String getRegion() {
		return getFieldString(Field.REGION.value());
	}
	
	public String getLocality() {
		return getFieldString(Field.LOCALITY.value());
	}
	
	public String getPostalCode() {
		return getFieldString(Field.POSTAL_CODE.value());
	}
	
	public String getCountry() {
		return getFieldString(Field.COUNTRY.value());
	}
	
	public Number getLatitude() {
		return getFieldNumber(Field.LATITUDE.value());
	}
	
	public Number getLongitude() {
		return getFieldNumber(Field.LONGITUDE.value());
	}

}
